package appoimg

import (
	"fmt"
	"github.com/spf13/viper"
)

type Mysql struct {
	Host     string
	Port     int
	User     string
	Password string
	Database string
}
type PoiGsr struct {
	Mysql Mysql
}

var GOin PoiGsr

func Init() {
	viper.SetConfigFile("appoimg/dev.yaml")
	err := viper.ReadInConfig()
	if err != nil {
		panic(err)
	}
	err = viper.Unmarshal(&GOin)
	if err != nil {
		panic(err)
	}
	fmt.Println("配置文件加载成功: ", GOin)
}
